﻿namespace ConsoleApp6
{
    //6 字符串内插

    internal class Program
    {
        public static void Main(string[] args)
        {
            string name = "尚";
            int age = 23;

            // 传统的字符串连接方式
            string message1 = "name：" + name + " age: " + age;

            // 使用字符串内插
            string message2 = $"name：{name} age: {age}";

            Console.WriteLine(message1);
            Console.WriteLine(message2);
        }
    }
}